Xbasic

*REMOVE_DUPLICATESI Function

Syntax

New_List as C = *REMOVE_DUPLICATESI(C list_on_values[,C delimiter])

Arguments

New_List

A list with duplicates removed.

list_on_values

The original list.

delimiter

Optional. Default = CR-LF. The character expression that separates entries in the list.

Description

Remove case-insensitive duplicate sequential entries from the list.

Discussion

The *REMOVE_DUPLICATESI() function removes duplicate entries from a list. The list must be sorted in ascending order first. The function is case insensitive.

Example

dim list as C
list = <<%str%
one
two
three
four
Two
one
%str%
list = sortsubstr(list, crlf() )
? *remove_duplicatesi(list)
= four
one
three
two

See Also